/* 数据库面板修复样式 */
.database-panel {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.database-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.database-title {
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.database-title i {
    margin-right: 12px;
    color: #9c27b0;
    font-size: 1.5rem;
}

/* 树形结构样式 */
.db-tree {
    padding: 15px;
    height: 300px; /* 固定高度 */
    overflow-y: auto;
    border-bottom: 1px solid #e0e0e0;
}

/* 字段比对表样式 */
.field-comparison {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: auto; /* 允许滚动 */
    padding: 15px;
    border-top: 1px solid #e0e0e0;
    height: calc(100% - 300px - 76px); /* 计算剩余高度 */
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.comparison-table thead {
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}

.comparison-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 树节点样式优化 */
.tree-node {
    margin: 5px 0;
}

.tree-content {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s;
    cursor: pointer;
}

.tree-content:hover {
    background: #f0f7ff;
}

.tree-content.selected {
    background: #e3f2fd;
    border: 1px solid #4285F4;
}

.tree-toggle {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    color: #4285F4;
    transition: transform 0.2s;
}

.tree-toggle.expanded {
    transform: rotate(90deg);
}

.tree-icon {
    margin-right: 8px;
    color: #4285F4;
}

.tree-label {
    flex: 1;
    font-size: 0.95rem;
}

.tree-type {
    color: #666;
    font-size: 0.85rem;
    margin-left: 8px;
}

.tree-children {
    margin-left: 32px;
    display: none;
}

.tree-children.expanded {
    display: block;
}
